<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            padding: 0px;
            margin: 0px;
        }

        .box {
            box-sizing: border-box;
            width: 185px;
            height: 205px;
            margin: 100px auto;
            border: 1px solid #ccc;
        }

        .box2 {
            position: relative;
            text-align: center;
            color: orangered;
        }

        img {
            width: 100%;
        }

        i {
            position: absolute;
            top: -2px;
            left: 3px;
            width: 1px;
            height: 1px;
            cursor: grab;

        }
    </style>
</head>

<body>
    <div class="box">
        <div class="box2">
            手机淘宝
            <img src="image/TB.png" alt="">
            <i class="btn">×</i>
        </div>
    </div>
    <script>
        var btn = document.querySelector('.btn')
        var box = document.querySelector('.box')
        //   绑定事件
        btn.onclick = function () {
            box.style.display = 'none'
        }
    </script>
</body>

</html>